package com.ruoyi.shop.member.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.shop.member.domain.ShopMemberAuth;

/**
 * 会员三方授权认证Mapper接口
 * 
 * @author ruoyi
 * @date 2023-11-16
 */
public interface ShopMemberAuthMapper {

	/**
	 * 查询会员用户三方授权认证
	 * 
	 * @param uniqueId 单端唯一标识
	 * @return
	 */
	public ShopMemberAuth selectByUniqueId(String uniqueId);

	/**
	 * 查询会员用户三方授权认证
	 * 
	 * @param unionId 多端唯一标识
	 * @return
	 */
	public ShopMemberAuth selectByUnionId(String unionId);

	/**
	 * 根据会员id查询UniqueId
	 * 
	 * @param memberId
	 * @param clientType
	 * @return
	 */
	public String selectUniqueIdByMemberId(@Param("memberId") Long memberId, @Param("clientType") String clientType);

	/**
	 * 查询会员用户三方授权认证
	 * 
	 * @param uniqueId 单端唯一标识
	 * @param unionId  多端唯一标识
	 * @return
	 */
	public ShopMemberAuth selectByUniqueIdOrUnionId(@Param("uniqueId") String uniqueId,
			@Param("unionId") String unionId);

	/**
	 * 查询会员用户三方授权认证列表
	 * 
	 * @param shopMemberAuth 会员用户三方授权认证
	 * @return 会员用户三方授权认证集合
	 */
	public List<ShopMemberAuth> selectAuthList(ShopMemberAuth shopMemberAuth);

	/**
	 * 新增会员用户三方授权认证
	 * 
	 * @param shopMemberAuth 会员用户三方授权认证
	 * @return 结果
	 */
	public int insertMemberAuth(ShopMemberAuth shopMemberAuth);

	/**
	 * 修改会员用户三方授权认证
	 * 
	 * @param shopMemberAuth 会员用户三方授权认证
	 * @return 结果
	 */
	public int updateMemberAuth(ShopMemberAuth shopMemberAuth);

}
